<template>
  <el-card>
    <div class="box">
      <img :src="userStore.avatar" class="avatar" />
      <div class="box_bottom">
        <h3 class="title">{{ getTime() }}好！ {{ userStore.username }}</h3>
        <p class="subtitle">{{ setting.left_title }}</p>
      </div>
    </div>
  </el-card>
  <div class="bottom">
    <svg-icon name="welcome" width="500px" height="500px"></svg-icon>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { getTime } from '@/utils/time'
// 引入设置标题与logo的配置文件
import setting from '@/setting'
import useUserStore from '@/store/modules/user'
let userStore = useUserStore()
</script>

<style scoped lang="scss">
.box {
  display: flex;
  // justify-content: space-between;
  // align-items: center;

  .avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
  }

  .box_bottom {
    margin-left: 20px;

    .title {
      font-size: 30px;
      font-weight: 900;
      margin-top: 20px;
      margin-bottom: 30px;
    }

    .subtitle {
      font-style: italic;
      color: skyblue;
    }
  }
}

.bottom {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
</style>
